package com.qk.management.mapper;

import com.qk.entity.Dept;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface DeptMapper {

    Integer count(@Param("name") String name,
                  @Param("status") Integer status);

    List<Dept> selectByPage(
            @Param("name") String name,
            @Param("status") Integer status,
            @Param("offSet") Integer offSet,
            @Param("pageSize") Integer pageSize);

    @Insert("insert into dept(name,status,create_time,update_time) values(#{name},#{status},#{createTime},#{updateTime})")
    void insert(Dept dept);

    Dept findById(Integer id);

    void update(Dept dept);

    void deleteById(Integer id);

    List<Dept> deptlists();
}